package com.spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.spring.model.User;

@Controller
public class LoginController {
	
	@RequestMapping(value="/login",method=RequestMethod.POST, produces = "application/json;charset=UTF-8")
	@ResponseBody
	public User login(String username,String password) {
		System.out.println(username+","+password);
		return new User(username, password);
	}
}
